package a24_PolymorphicPractice;

/**
 * @Author quan
 * @Description 父类
 * @Date 2023/2/12 22:35
 */
public class Animal {
    private int age;
    public String color;

    public Animal(){

    }
    public Animal(int age, String color){
        this.age = age;
        this.color = color;
    }
    public void setAge(int age){
        this.age = age;
    }
    public int getAge(){
        return age;
    }
    public void setColor(String color){
        this.color = color;
    }
    public String getColor(){
        return color;
    }
    //吃的方法，传入参数
    public void eat(String something){
        System.out.println("动物在吃东西");
    }
}
